package com.itheima.chapter07.bacispackage;
//字符串中数据处理
//有一个字符串"91 27 46 38 50"把其中每一个数存到int类型数组
public class Case {
    public static void main(String[] args) {
        String s ="91 27 46 38 50";
        String[] split = s.split(" ");
        int[] numarr=new int[split.length];
        for (int i = 0; i < split.length; i++) {
            int num = Integer.parseInt(split[i]);
            numarr[i]=num;
        }
        for (int i = 0; i < numarr.length; i++) {
            System.out.println(numarr[i]);
        }
    }
}
